package br.usp.ime.AUN;

import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

public class EntityManagerFactoryProvider {
	private static EntityManagerFactoryProvider instance;
	private EntityManagerFactory emf;
		
	public EntityManagerFactoryProvider(){
		emf=Persistence.createEntityManagerFactory("AUNPU");
	}
	
	public static EntityManagerFactory getInstance(){
		if(instance==null){
			instance=new EntityManagerFactoryProvider();
		}
		return instance.emf;
	}
}
